<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<h1>通过style设置样式</h1>
			<div style="color: red;font-size: 16px;">Hello,world</div>
			<div :style="styleObject">Hello,world</div>
			<input type="text" v-model="styleObject.color" />
			<input type="text" v-model="styleObject.fontSize" />
			<input type="color" v-model="styleObject.color" />
		</div>
		
		<script>
			var app = Vue.createApp({
				data(){
					return {
						styleObject:{
							color: 'red',
							fontSize: '18px'
						}
					}
				}
			}).mount("#app")
		</script>
	</body>
</html>
